import request from '../../../src/utils/request';
//枚举定义接口地址
enum API {
    CARTLIST = '/cart/cartList',//获取某一个用户的购物车接口
    STEPPERPLUS = '/cart/addToCart/',//商品数量改变的接口
    CHECKCART = '/cart/checkCart/',//切换选择状态
    DELETECART = '/cart/deleteCart/',//删除商品
}

//获取某一个用户的购物车接口
export const reqUserCartList = () => request.get(API.CARTLIST);
//商品数量修改
export const reqUpskuNumCart = (skuId: any, skuNum: any) => request.post(API.STEPPERPLUS + `${skuId}/${skuNum}`)
//商品状态
export const reqCheck = (skuId: any, isChecked: any) => request.get(API.CHECKCART + `${skuId}/${isChecked}`)
//删除商品
export const reqDelete = (skuId: any) => request.delete(API.DELETECART + `${skuId}`)

